<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>公务员考试报名管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
	<script type="text/javascript"> //去除重复下列框
    $(function () {
        $("select").each(function (i, n) {
            var options = "";
            $(n).find("option").each(function (j, m) {
                if (options.indexOf($(m)[0].outerHTML) == -1) {
                    options += $(m)[0].outerHTML;
                }
            });
            $(n).html(options);
        });
    });
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/campusinfoexam/campusinfoServant/">公务员考试报名列表</a></li>
	</ul>
	<form:form id="searchForm" modelAttribute="campusinfoServant" action="${ctx}/campusinfoexam/campusinfoServant/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li>
				<label>用户</label>
				<form:select path="user.id" class="input-medium required">
					<form:option value="" label=""/>
					<form:options items="${campusinfoServants}" itemLabel="user.name" itemValue="user.id" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>考试名称：</label>
				<form:select path="servantId" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${campusinfoServants}" itemLabel="servantName" itemValue="servantId" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>考试费用：</label>
				<form:input path="payment" htmlEscape="false" maxlength="255" class="input-medium"/>
			</li>
			<li><label>订单号：</label>
				<form:input path="orderCode" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>支付方式：</label>
				<form:select path="paymentMethod" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('pay_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>订单状态：</label>
				<form:select path="status" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('order_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>缴费地点：</label>
				<form:input path="paymentPlace" htmlEscape="false" maxlength="255" class="input-medium"/>
			</li>
			<%--<li><label>归属用户：</label>--%>
				<%--<sys:treeselect id="user" name="user.id" value="${campusinfoServant.user.id}" labelName="user.name" labelValue="${campusinfoServant.user.name}"--%>
					<%--title="用户" url="/sys/office/treeData?type=3" cssClass="input-small" allowClear="true" notAllowSelectParent="true"/>--%>
			<%--</li>--%>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>用户姓名</th>
				<th>考试名称</th>
				<th>考试费用</th>
				<th>订单号</th>
				<th>支付方式</th>
				<th>订单状态</th>
				<th>缴费地点</th>
				<shiro:hasPermission name="campusinfoexam:campusinfoServant:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="campusinfoServant">
			<tr>
				<td>
						${campusinfoServant.user.name}
				</td>
				<td><a href="${ctx}/campusinfoexam/campusinfoServant/form?id=${campusinfoServant.id}">
					${campusinfoServant.servantName}
				</a></td>
				<td>
					${campusinfoServant.payment}
				</td>
				<td>
						${campusinfoServant.orderCode}
				</td>
				<td>
					${fns:getDictLabel(campusinfoServant.paymentMethod, 'pay_type', campusinfoServant.id)}
				</td>
				<td>
					${fns:getDictLabel(campusinfoServant.status, 'order_type', campusinfoServant.id)}
				</td>
				<td>
					${campusinfoServant.paymentPlace}
				</td>
				<shiro:hasPermission name="campusinfoexam:campusinfoServant:edit"><td>
					<a href="${ctx}/campusinfoexam/campusinfoServant/delete?id=${campusinfoServant.id}" onclick="return confirmx('确认要删除该公务员考试报名吗？', this.href)">删除</a>
					<a href="${ctx}/campusinfoexam/campusinfoServant/status?id=${campusinfoServant.id}"
					   onclick="return confirmx('确认要修改订单状态吗？', this.href)">支付</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>